<template>
  <div>
    <div>
      <RHTable :RHTable="table" ref="r_h_table"></RHTable>
    </div>
    <div>
      <RHDetailsDialog
        :RHDetailsDialog="detailsDialog"
        ref="r_h_details_dialog"
      ></RHDetailsDialog>
    </div>
  </div>
</template>
<script>
import RHTable from "@/common/RHTable/index.vue";
import RHDetailsDialog from "@/common/details/detailsDialog.vue";
export default {
  components: {
    RHTable,
    RHDetailsDialog
  },
  name: "user_index",
  data: function() {
    return {
      param: {},
      table: {
        url: this.$store.state.url.log + "/api/log/getList",
        header: {
          show: true
        },
        columns: [
          { fieId: "logId", title: "ID" },
          { fieId: "logOperationUserName", title: "操作人" },
          { fieId: "logOperationTime", title: "操作时间" },
          { fieId: "logRequestUrl", title: "请求地址" },
          { fieId: "logRequestData", title: "请求数据", hide: true },
          { fieId: "logRequestIp", title: "请求ip" },
          { fieId: "logResponseData", title: "返回数据", hide: true }
        ],
        columnsBtn: [{ value: "详情", click: this.detail, size: "mini" }],
        // 分页
        paging: true,
        //展示隐藏列
        hideColumn: true
      },
      detailsDialog: {
        dialog: {
          title: "日志详情"
        },
        details: {
          columns: [
            { fieId: "logId", title: "ID" },
            { fieId: "logOperationUserName", title: "操作人" },
            { fieId: "logOperationTime", title: "操作时间" },
            { fieId: "logRequestUrl", title: "请求地址" },
            { fieId: "logRequestData", title: "请求数据" },
            { fieId: "logRequestIp", title: "请求ip" },
            { fieId: "logResponseData", title: "返回数据" }
          ],
          data: {}
        }
      }
    };
  },
  methods: {
    resetForm() {
      this.$refs.r_h_form.resetForm();
    },
    detail(row) {
      this.detailsDialog.details.data = row;
      this.$refs.r_h_details_dialog.closeShow();
    }
  }
};
</script>

<style scoped></style>
